package com.cskaoyan.bean.vo;

import com.cskaoyan.bean.po.MarketCategory;
import lombok.Data;
import org.springframework.beans.BeanUtils;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

@Data
public class WXGoodsCategoryVo {
    /**
     * currentCategory : {"picUrl":"http://yanxuan.nosdn.127.net/2e2fb4f2856a021bbcd1b4c8400f2b06.png","deleted":false,"keywords":"","addTime":"2018-02-01 00:00:00","level":"L2","sortOrder":6,"name":"布艺软装","pid":1005000,"updateTime":"2022-09-06 22:58:40","id":1008002,"iconUrl":"http://yanxuan.nosdn.127.net/8bbcd7de60a678846664af998f57e71c.png","desc":"各种风格软装装点你的家"}
     * brotherCategory : [{"picUrl":"http://yanxuan.nosdn.127.net/2e2fb4f2856a021bbcd1b4c8400f2b06.png","deleted":false,"keywords":"","addTime":"2018-02-01 00:00:00","level":"L2","sortOrder":6,"name":"布艺软装","pid":1005000,"updateTime":"2022-09-06 22:58:40","id":1008002,"iconUrl":"http://yanxuan.nosdn.127.net/8bbcd7de60a678846664af998f57e71c.png","desc":"各种风格软装装点你的家"},{"picUrl":"http://yanxuan.nosdn.127.net/b43ef7cececebe6292d2f7f590522e05.png","deleted":false,"keywords":"","addTime":"2018-02-01 00:00:00","level":"L2","sortOrder":2,"name":"被枕","pid":1005000,"updateTime":"2018-02-01 00:00:00","id":1008008,"iconUrl":"http://yanxuan.nosdn.127.net/927bc33f7ae2895dd6c11cf91f5e3228.png","desc":"守护你的睡眠时光"},{"picUrl":"http://yanxuan.nosdn.127.net/81f671bd36bce05d5f57827e5c88dd1b.png","deleted":false,"keywords":"","addTime":"2018-02-01 00:00:00","level":"L2","sortOrder":4,"name":"床品件套","pid":1005000,"updateTime":"2018-02-01 00:00:00","id":1008009,"iconUrl":"http://yanxuan.nosdn.127.net/243e5bf327a87217ad1f54592f0176ec.png","desc":"MUJI等品牌制造商出品"},{"picUrl":"http://yanxuan.nosdn.127.net/f702dc399d14d4e1509d5ed6e57acd19.png","deleted":false,"keywords":"","addTime":"2018-02-01 00:00:00","level":"L2","sortOrder":8,"name":"灯具","pid":1005000,"updateTime":"2018-02-01 00:00:00","id":1008016,"iconUrl":"http://yanxuan.nosdn.127.net/c48e0d9dcfac01499a437774a915842b.png","desc":"一盏灯，温暖一个家"},{"picUrl":"http://yanxuan.nosdn.127.net/1611ef6458e244d1909218becfe87c4d.png","deleted":false,"keywords":"","addTime":"2018-02-01 00:00:00","level":"L2","sortOrder":5,"name":"地垫","pid":1005000,"updateTime":"2018-02-01 00:00:00","id":1010003,"iconUrl":"http://yanxuan.nosdn.127.net/83d4c87f28c993af1aa8d3e4d30a2fa2.png","desc":"家里的第\u201c五\u201d面墙"},{"picUrl":"http://yanxuan.nosdn.127.net/d6e0e84961032fc70fd52a8d4d0fb514.png","deleted":false,"keywords":"","addTime":"2018-02-01 00:00:00","level":"L2","sortOrder":3,"name":"床垫","pid":1005000,"updateTime":"2018-02-01 00:00:00","id":1011003,"iconUrl":"http://yanxuan.nosdn.127.net/316afeb3948b295dfe073e4c51f77a42.png","desc":"承托你的好时光"},{"picUrl":"http://yanxuan.nosdn.127.net/79275db76b5865e6167b0fbd141f2d7e.png","deleted":false,"keywords":"","addTime":"2018-02-01 00:00:00","level":"L2","sortOrder":9,"name":"家饰","pid":1005000,"updateTime":"2018-02-01 00:00:00","id":1011004,"iconUrl":"http://yanxuan.nosdn.127.net/ab0df9445d985bf6719ac415313a8e88.png","desc":"装饰你的家"},{"picUrl":"http://yanxuan.nosdn.127.net/d5d41841136182bf49c1f99f5c452dd6.png","deleted":false,"keywords":"","addTime":"2018-02-01 00:00:00","level":"L2","sortOrder":7,"name":"家具","pid":1005000,"updateTime":"2018-02-01 00:00:00","id":1015000,"iconUrl":"http://yanxuan.nosdn.127.net/4f00675caefd0d4177892ad18bfc2df6.png","desc":"大师级工艺"},{"picUrl":"http://yanxuan.nosdn.127.net/dae4d6e89ab8a0cd3e8da026e4660137.png","deleted":false,"keywords":"","addTime":"2018-02-01 00:00:00","level":"L2","sortOrder":10,"name":"宠物","pid":1005000,"updateTime":"2018-02-01 00:00:00","id":1017000,"iconUrl":"http://yanxuan.nosdn.127.net/a0352c57c60ce4f68370ecdab6a30857.png","desc":"抑菌除味，打造宠物舒适空间"},{"picUrl":"http://yanxuan.nosdn.127.net/bd17c985bacb9b9ab1ab6e9d66ee343c.png","deleted":false,"keywords":"","addTime":"2018-02-01 00:00:00","level":"L2","sortOrder":1,"name":"夏凉","pid":1005000,"updateTime":"2018-02-01 00:00:00","id":1036000,"iconUrl":"http://yanxuan.nosdn.127.net/13ff4decdf38fe1a5bde34f0e0cc635a.png","desc":"夏凉床品，舒适一夏"},{"picUrl":"","deleted":false,"keywords":"123","addTime":"2022-09-08 12:44:38","level":"L2","sortOrder":50,"name":"123","pid":1005000,"updateTime":"2022-09-08 12:44:38","id":1036053,"iconUrl":"","desc":""}]
     * parentCategory : {"picUrl":"http://yanxuan.nosdn.127.net/e8bf0cf08cf7eda21606ab191762e35c.png","deleted":false,"keywords":"11","addTime":"2018-02-01 00:00:00","level":"L1","sortOrder":2,"name":"居家","pid":0,"updateTime":"2022-09-08 16:08:08","id":1005000,"iconUrl":"http://yanxuan.nosdn.127.net/a45c2c262a476fea0b9fc684fed91ef5.png","desc":"回家，放松身心1"}
     */
    //pid等于本类目的子类目当前信息
    private CurrentCategoryEntity currentCategory = new CurrentCategoryEntity();
    //子类目信息表
    private List<BrotherCategoryEntity> brotherCategory = new ArrayList<>();
    //本身类目信息
    private ParentCategoryEntity parentCategory = new ParentCategoryEntity();

    public void setCurrentCategoryEntity(MarketCategory marketCategory){
        BeanUtils.copyProperties(marketCategory,currentCategory);
    }

    public void setParentCategoryEntity(MarketCategory marketCategory){
        BeanUtils.copyProperties(marketCategory,parentCategory);
    }

    public void setBrotherCategoryEntity(MarketCategory marketCategory){
        BrotherCategoryEntity categoryEntity = new BrotherCategoryEntity();
        BeanUtils.copyProperties(marketCategory,categoryEntity);
        brotherCategory.add(categoryEntity);
    }

    @Data
    public class CurrentCategoryEntity {
        /**
         * picUrl : http://yanxuan.nosdn.127.net/2e2fb4f2856a021bbcd1b4c8400f2b06.png
         * deleted : false
         * keywords :
         * addTime : 2018-02-01 00:00:00
         * level : L2
         * sortOrder : 6
         * name : 布艺软装
         * pid : 1005000
         * updateTime : 2022-09-06 22:58:40
         * id : 1008002
         * iconUrl : http://yanxuan.nosdn.127.net/8bbcd7de60a678846664af998f57e71c.png
         * desc : 各种风格软装装点你的家
         */
        private String picUrl;
        private Boolean deleted;
        private String keywords;
        private Date addTime;
        private String level;
        private Byte sortOrder;
        private String name;
        private Integer pid;
        private Date updateTime;
        private Integer id;
        private String iconUrl;
        private String desc;

    }

    @Data
    public class BrotherCategoryEntity {
        /**
         * picUrl : http://yanxuan.nosdn.127.net/2e2fb4f2856a021bbcd1b4c8400f2b06.png
         * deleted : false
         * keywords :
         * addTime : 2018-02-01 00:00:00
         * level : L2
         * sortOrder : 6
         * name : 布艺软装
         * pid : 1005000
         * updateTime : 2022-09-06 22:58:40
         * id : 1008002
         * iconUrl : http://yanxuan.nosdn.127.net/8bbcd7de60a678846664af998f57e71c.png
         * desc : 各种风格软装装点你的家
         */
        private String picUrl;
        private Boolean deleted;
        private String keywords;
        private Date addTime;
        private String level;
        private Byte sortOrder;
        private String name;
        private Integer pid;
        private Date updateTime;
        private Integer id;
        private String iconUrl;
        private String desc;

    }

    @Data
    public class ParentCategoryEntity {
        /**
         * picUrl : http://yanxuan.nosdn.127.net/e8bf0cf08cf7eda21606ab191762e35c.png
         * deleted : false
         * keywords : 11
         * addTime : 2018-02-01 00:00:00
         * level : L1
         * sortOrder : 2
         * name : 居家
         * pid : 0
         * updateTime : 2022-09-08 16:08:08
         * id : 1005000
         * iconUrl : http://yanxuan.nosdn.127.net/a45c2c262a476fea0b9fc684fed91ef5.png
         * desc : 回家，放松身心1
         */
        private String picUrl;
        private Boolean deleted;
        private String keywords;
        private Date addTime;
        private String level;
        private Byte sortOrder;
        private String name;
        private Integer pid;
        private Date updateTime;
        private Integer id;
        private String iconUrl;
        private String desc;

    }
}
